﻿Namespace Views.Shared
    Public MustInherit Class SiteMaster(Of TModel As Class)
        Inherits VbView(Of TModel)

        Public MustOverride Function RenderContent() As XElement

        Public Overrides Function Render() As XElement
            Return _
                <html>
                    <head>
                        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
                        <title><%= ViewData("Title") %></title>
                        <link href="../../Content/Site.css" rel="stylesheet" type="text/css"/>
                    </head>

                    <body>
                        <div class="page">

                            <div id="header">
                                <div id="title">
                                    <h1>My Sample MVC Application</h1>
                                </div>

                                <div id="logindisplay">
                                    <%= Xhtml.RenderPartial(New LoginControl) %>
                                </div>

                                <div id="menucontainer">

                                    <ul id="menu">
                                        <li><%= Xhtml.ActionLink("Home", "Index", "Home") %></li>
                                        <li><%= Xhtml.ActionLink("About Us", "About", "Home") %></li>
                                    </ul>

                                </div>
                            </div>

                            <div id="main">
                                <%= RenderContent() %>

                                <div id="footer">
            My Sample MVC Application <amp/>copy; Copyright 2009
            </div>
                            </div>
                        </div>
                    </body>
                </html>
        End Function
    End Class
End Namespace